A5Storage::SubContainer GetItem Method

Syntax

.GetItem as L (BYREF Data as B, BYREF ContentType as C, TargetPath as C)

.GetItem as L (BYREF Data as C, BYREF ContentType as C, TargetPath as C)

Arguments

BYREF DataBinary Character

 

BYREF ContentTypeCharacter

 

TargetPathCharacter

 

Returns

ResultLogical

Returns .T. if the operation succeeds, otherwise .F. (see .CallResult for additional error information.)

Description

Retrieves an item from the container using the name you provide. The content type is also returned.

Discussion

You must dimension the resulting Data variable and the ContentType variable prior to making the call.

Example

dim ResultData as B
dim ContentType as C
dim SubContainer as A5Storage::SubContainer = null_value()

CallResult = A5Storage::SubContainer::Open(SubContainer, "Provider='Disk';Container='c:\A5Webroot';", "logs")
? CallResult.Success
= .T.

? SubContainer.GetItem(ResultData, ContentType, "MyFile.jpg")
= .T.